package com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.repository;

import com.slz3.business.frame.module.Repositorys;
import com.slz3.business.frame.util.VE;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.domain.GooBaseGoodsAttribute;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.domain.GooBaseGoodsAttributeCondition;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.steward.GooBaseGoodsAttributeSpecification;

import java.util.List;
import java.util.UUID;

public class GooBaseGoodsAttributeCustomizedRepositoryImpl implements GooBaseGoodsAttributeCustomizedRepository {
    @Override
    public void test() {
        System.err.println(Repositorys.gooBaseGoodsAttribute);
        System.err.println("test: customized repository");
    }

    @Override
    public List<GooBaseGoodsAttribute> findByFkGooBaseGoods(List<UUID> uuidList) {

        if (VE.isEmpty(uuidList)) {
            return null;
        }

        GooBaseGoodsAttributeCondition condition = new GooBaseGoodsAttributeCondition();
        condition.setFkGooBaseGoodsList(uuidList);

        return Repositorys.gooBaseGoodsAttribute.findAll(GooBaseGoodsAttributeSpecification.findJoin(condition));

    }

}
